<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="__PUBLIC__/weui/dist/style/weui.css"/>
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/weui/dist/example/search.css"/>
    <script src="__PUBLIC__/weui/dist/example/zepto.min.js"></script>
    <title>产品对比</title>
    <style>
        body{
            background: #ffffff;
        }
        table{
            width: 100%;
            margin: 0 auto;
            border-collapse: collapse;
            font-size: 14px;
            font-weight: 400;
            border:#ffffff;
            text-align: center;
        }
        td{
            font-size: 14px;
            border-bottom: 1px #eee dotted;
            border-right: 1px #eee solid;
        }
        td:nth-last-child(1){
            border-right:none;
        }
        th:nth-last-child(1){
            border-right:none;
        }
        th{
            background:#336666;
            color: #ffffff;
            padding: 2% 0.4%;
            border-right: 1px #ffffff solid;
        }
        th:nth-child(1){
            width: 12%;
        }
    </style>
</head>

<body>
    <table border="1">
        <tr id="tr1">
            <th style="width:24%">产品名称</th>
            <th style="width:38%"><?php echo $info[0]['wzmc']?></th>
            <th style="width:38%"><?php echo $info[1]['wzmc']?></th>
        </tr>
        <tr  class="tr2">
            <td>所属分类</td>
            <td><?php echo $info[0]['flmc']?>
            </td>
            <td><?php echo $info[1]['flmc']?>
            </td>
        </tr>
        <tr  class="tr2">
            <td>型号</td>
            <td><?php echo $info[0]['xh']; ?></td>
            <td><?php echo $info[1]['xh']; ?></td>
        </tr>
        <tr  class="tr2">
            <td>型号规格</td>
            <td><?php echo $info[0]['xhgg']; ?></td>
            <td><?php echo $info[1]['xhgg']; ?></td>
        </tr>
        <tr  class="tr2">
            <td>总规范</td>
            <td><?php echo $info[0]['zgf']; ?></td>
            <td><?php echo $info[1]['zgf']; ?></td>
        </tr>
        <tr  class="tr2">
            <td>质量等级</td>
            <td><?php echo $info[0]['zldjmc']; ?></td>
            <td><?php echo $info[1]['zldjmc']; ?></td>
        </tr>
        <tr  class="tr2">
            <td>计量单位</td>
            <td><?php echo $info[0]['jldwmc']; ?></td>
            <td><?php echo $info[1]['jldwmc']; ?></td>
        </tr>
        <tr  class="tr2">
            <td>进口/国产</td>
            <td>
                <?php if($info[0]['gcjk']==0)
                        echo '国产';
                     else
                        echo '进口';
                ?>
            </td>
            <td>
                <?php if($info[1]['gcjk']==0)
                        echo '国产';
                     else
                        echo '进口';
                ?>
            </td>
        </tr>
        <tr  class="tr2">
            <td>附加属性</td>
            <td>
                <?php foreach($info[0]['sx'] as $k=>$v): ?>
                <span class="sp_left">
                    <?php echo $v['sxmc']; ?>
                    <?php
                        if($v['sxdw']!=NULL)
                            echo '('.$v['sxdw'].')';
                   ?>
                    :</span>
                <span class="sp_right"><?php echo $v['zdysxz']; ?></span><br>
                <?php endforeach; ?>
            </td>
            <td>
                <?php foreach($info[1]['sx'] as $k=>$v): ?>
                <span class="sp_left">
                    <?php echo $v['sxmc']; ?>
                    <?php
                        if($v['sxdw']!=NULL)
                            echo '('.$v['sxdw'].')';
                   ?>
                    :</span>
                <span class="sp_right"><?php echo $v['zdysxz']; ?></span><br>
                <?php endforeach; ?>
            </td>
        </tr>
        <tr  class="tr2">
            <td>供货商</td>
            <td><a href="{:u('ghs',array('gysno'=>$info[0]['gysno']))}"><?php echo $info[0]['ghs']; ?></a></td>
            <td><a href="{:u('ghs',array('gysno'=>$info[1]['gysno']))}"><?php echo $info[1]['ghs']; ?></a></td>
        </tr>
    </table>

</body>
<script>
    $(function(){
        background();
    });
    function background(){
        $('.tr2:odd').css('background','#F0F0F0');
    }
</script>
</html>